import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'bootstrap/dist/css/bootstrap.min.css'
import axios from 'axios'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);
//引入自定义组件模块
import myComponent from '@/components/block/index'
Vue.use(myComponent)
//引入百度地图
import BaiduMap from 'vue-baidu-map'

import './plugins/element.js'
Vue.use(BaiduMap, {
  ak: 'jD495hnAzo0txZkaRPCFFTfomQ7zNS38'
})

Vue.config.productionTip = false
// 设置请求发送拦截器
axios.interceptors.request.use(config => {
  // console.log(config)
  // config.headers.Authorization = window.sessionStorage.getItem('token');
  config.headers.Authorization = "123";
  return config;
})
//设置请求返回拦截器
axios.interceptors.response.use(config => {
  return config;
})
//将axios挂在全局
Vue.prototype.$http = axios

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
